﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace website.template_faa.admin
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    public class saveNBSJTHType : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            string sql = "insert into [tonghangNBSJ] (nbsjId,nbsjName) values(@nbsjId,@nbsjName)";
            System.Data.SqlClient.SqlParameter paraId = jsm.SqlHelper.SqlServerHelper.CreateInputParameter("@nbsjId", System.Data.SqlDbType.NVarChar, 100, context.Request["nbsjId"]);
            System.Data.SqlClient.SqlParameter paraName = jsm.SqlHelper.SqlServerHelper.CreateInputParameter("@nbsjName", System.Data.SqlDbType.NVarChar, 100, context.Request["nbsjName"]);

            int rc = jsm.SqlHelper.SqlServerHelper.ExecuteNonQuery(sql, paraId, paraName);
            if (rc == 1)
            {
                context.Response.Write("SUCCESS");
            }
            else
            {
                context.Response.Write("FAILURE");
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
